package com.od.service.serviceImpl;

import com.od.entity.Enterprise;
import com.od.mapper.EnterpriseMapper;
import com.od.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EnterpriseServiceImpl implements EnterpriseService {

    @Autowired
    private EnterpriseMapper enterpriseMapper;
    @Override
    public Enterprise getEnterpriseById(Integer enterpriseId) {
        return enterpriseMapper.selectEnterpriseById(enterpriseId);
    }

    @Override
    public int updateEnterpriseInfo(Enterprise enterprise) {
        return enterpriseMapper.updateEnterpriseInfo(enterprise);
    }

    @Override
    public Enterprise getEnterpriseByTel(String tel) {
        return enterpriseMapper.selectByTel(tel);
    }

    @Override
    public int getEnterpriseIdByTel(String tel) {
        return enterpriseMapper.selectIdByTel(tel);
    }

    @Override
    public int addEnterprise(Enterprise enterprise) {
        return enterpriseMapper.insertEnterprise(enterprise);
    }


}
